package day07;

import java.util.Scanner;

public class String02 {
    public static void main(String[] args) {                    //数字串转换罗马数字
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一串长度小于等于9的数字串");
        String str = sc.nextLine();
        String[] Roman={"","I","II","III","IV","V","VI","VII","VIII","IX"};
        StringBuilder sb=new StringBuilder(str);
        StringBuilder newStr=new StringBuilder();
        for(int i=0;i<sb.length();i++)  newStr.append(Roman[sb.charAt(i)-48]);
        System.out.println(newStr);
    }
}
